package com.ibeeking.found.upms.api.feign;

import com.ibeeking.found.upms.api.feign.fallback.GlobalTenantFallbackFactory;
import com.ibeeking.found.upms.api.common.dto.TenantListDTO;
import com.ibeeking.nematos.utils.result.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @Author ibeeking
 */
@FeignClient(name = "gmc-global-g-server", path = "/g", contextId = "globalTenantClient", fallbackFactory = GlobalTenantFallbackFactory.class, decode404 = true)
public interface GlobalTenantClient {

    /**
     * 查询租户信息通过租户id列表
     *
     * @param ids
     * @return
     */
    @PostMapping("/tenant/feign/v1/queryUserTenantsByIds")
    ResponseResult<List<TenantListDTO>> queryUserTenantsByIds(@RequestBody List<Integer> ids);
}
